home *** CD-ROM | disk | FTP | other *** search
- /********************************/
- /* File: SimpleXCMD.c */
- /* */
- /* This is what a simple XCMD */
- /* written in Lightspeed "C" */
- /* In order to build this code */
- /* resource, you will need the */
- /* two files "HyperXCMD.h" and */
- /* XCMDGlue.c. */
- /* */
- /* ---------------------------- */
- /* To Build: */
- /* */
- /* (1) Create a project using */
- /* this file as well as the */
- /* XCMD.Glue.c file. (Set */
- /* project type to XCMD (or */
- /* XFCN) from the Project menu. */
- /* */
- /* (2) Bring the project up to */
- /* date. */
- /* */
- /* (3) Build Code Resource. */
- /* */
- /* (4) Use ResEdit to copy the */
- /* resource to your stack. */
- /********************************/
-
- #include <MacTypes.h>
- #include <OSUtil.h>
- #include <MemoryMgr.h>
- #include <FileMgr.h>
- #include <ResourceMgr.h>
- #include "HyperXCmd.h"
-
- pascal void main( paramPtr )
- XCmdBlockPtr paramPtr;
- {
- char theString[256]; /* A "Pascal" String */
-
- theString[0] = '\0x0B'; /* Remember, static */
- theString[1] = 'H'; /* strings are placed */
- theString[2] = 'E'; /* in the global pool */
- theString[3] = 'L'; /* CODE resources such */
- theString[4] = 'L'; /* as XCMDS and XFCNS */
- theString[5] = 'O'; /* don't have access to */
- theString[6] = ' '; /* globals so you have */
- theString[7] = 'W'; /* to discretely set the*/
- theString[8] = 'O'; /* string's value */
- theString[9] = 'R';
- theString[10]= 'L';
- theString[11]= 'D';
-
- /* A sample callback example */
- paramPtr->returnValue = PasToZero( paramPtr, &theString );
- }
-
-